<div class="form">

<?php $form=$this->beginWidget('CActiveForm', array(
	'id'=>'article-form',
	'enableAjaxValidation'=>false,
)); ?>

	<p class="note">标识 <span class="required">*</span> 为必填项.</p>

	<?php echo Yii::app()->admin->showPutMsg(); ?>
	<?php echo $form->errorSummary($model); ?>

	<div class="row">
		<?php echo $form->labelEx($model,'title'); ?>
		<?php echo $form->textField($model,'title',array('size'=>50,'maxlength'=>50)); ?>
		<?php echo $form->error($model,'title'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'keywords'); ?>
		<?php echo $form->textField($model,'keywords',array('size'=>60,'maxlength'=>100)); ?>
		<?php echo $form->error($model,'keywords'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'desc'); ?>
		<?php echo $form->textArea($model,'desc',array('rows'=>6, 'cols'=>50)); ?>
		<?php echo $form->error($model,'desc'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'cat_id'); ?>
		<?php echo $form->dropDownList($model,'cat_id', AdminhtmlHelper::getArticleCatOptions()  ); ?>
		<?php echo $form->error($model,'cat_id'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'content'); ?>
		<?php //echo $form->textArea($model,'content',array('rows'=>6, 'cols'=>50)); ?>
<?php $this->widget('application.extensions.tinymceExt.ETinyMce',array(
	'id'=>'Article_content',
	'name'=>'Article[content]',
	'value'=>$model->content,
	'language'=>'zh-cn',
	'editorTemplate'=>'full',
	
	//'width'=>'80%',
	//'height'=>'400px',
)); ?>
		<?php echo $form->error($model,'content'); ?>
	</div>

	<div class="row">
	<?php echo $form->labelEx($model,'create_time'); ?>
    <?php echo $form->textField($model,'create_time', array('size'=>20,'maxlength'=>20)); ?>
<?php $this->widget('application.extensions.calendar.SCalendar',
    array(
        'inputField'=>'Article_create_time',		//对应input框
        'ifFormat'=>'%Y-%m-%d %H:%M:%S',	//时间格式
        'showsTime'=>true,					//是否可以选择时间
        //'range'=>"[2008,2010]"			//年份范围
        //'position'=>"[400,200]",			//框的出现坐标
)); ?>
    <?php echo $form->error($model,'create_time'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'author'); ?>
		<?php echo $form->textField($model,'author',array('size'=>20,'maxlength'=>20)); ?>
		<?php echo $form->error($model,'author'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'author_email'); ?>
		<?php echo $form->textField($model,'author_email',array('size'=>50,'maxlength'=>50)); ?>
		<?php echo $form->error($model,'author_email'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'sort_order'); ?>
		<?php echo $form->textField($model,'sort_order'); ?>
		<?php echo $form->error($model,'sort_order'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'status'); ?>
		<?php echo $form->dropDownList($model,'status', AdminhtmlHelper::getStatusOptions()  ); ?>
		<?php echo $form->error($model,'status'); ?>
	</div>

	<div class="row buttons">
		<?php echo CHtml::submitButton($model->isNewRecord ? 'Create' : 'Save'); ?>
	</div>

<?php $this->endWidget(); ?>

</div><!-- form -->